//
// Created by Yang2 on 2022/4/28.
//

#ifndef ORIGIN_MYGLRENDERCONTEXT_H
#define ORIGIN_MYGLRENDERCONTEXT_H
#include "LogUtil.h"
#include "../project/triangle/TriangleSample.h"
#include <GLES3/gl3.h>

class MyGLRenderContext {


public:

    void SetImageData(int format, int width, int height, uint8_t *pData);

    void OnSurfaceCreated();

    void OnDrawFrame();

    void SetParamsInt(int paramType);


    void OnSurfaceChanged(int width, int height);

    static MyGLRenderContext *GetInstance();

    static void DestroyInstance();

private:
    static MyGLRenderContext *m_pContext;
    GLSampleBase *m_pCurSample;
    int m_ScreenW;
    int m_ScreenH;
};


#endif //ORIGIN_MYGLRENDERCONTEXT_H
